\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mysixfour}

\RequirePackage{xparse}
\newlength{\SixfourDefaultHeight}
\AtBeginDocument{\setlength{\SixfourDefaultHeight}{\fontcharht\font`X}}

%\begingroup\expandafter\expandafter\expandafter\endgroup
%\expandafter\ifx\csname pdfsuppresswarningpagegroup\endcsname\relax
%\else
%\pdfsuppresswarningpagegroup=1\relax
%\fi
%
\newcommand{\sixfour}[2][height=\SixfourDefaultHeight]{%
    \csname sixfour #2\endcsname{#1}%
}%
%\NewDocumentCommand{\sixfour}{s O{height=\SixfourDefaultHeight} m}{
%%\newcommand{\sixfour*}[2][height=\SixfourDefaultHeight]{%
%    \csname sixfour #3\endcsname{#2}%
%}%
\newcommand{\textsixfour}[1]{%
    \raisebox{-.1ex}{\sixfour[height=1.1\fontcharht\font`X]{#1}}%
}%
%\newcommand{\defineanemoji}[2]{%
%    \expandafter\newcommand\csname anemoji #2\endcsname[1]{%
%        \includegraphics[page=#1, ##1]{anemoji.pdf}}%
%}%

\NewDocumentCommand{\definesixfour}{ s m m }{
    \expandafter\newcommand\csname sixfour #3\endcsname[1]{
        \IfBooleanTF{#1}{
            {\kern1ex\fontspec{DejaVu Sans}\char\numexpr"262F+#2}}{
            {\kern-0.9ex\CJKfontspec{DejaVu Sans}\char\numexpr"4DBF+#2}}}
}%

\definesixfour*{1}{小乾}%
\definesixfour*{2}{小兑}%
\definesixfour*{3}{小离}%
\definesixfour*{4}{小震}%
\definesixfour*{5}{小巽}%
\definesixfour*{6}{小坎}%
\definesixfour*{7}{小艮}%
\definesixfour*{8}{小坤}%

\definesixfour*{0}{太极}%
\definesixfour*{91}{阳}%
\definesixfour*{92}{阴}%
\definesixfour*{93}{老阳}%
\definesixfour*{94}{少阴}%
\definesixfour*{95}{少阳}%
\definesixfour*{96}{老阴}%

\definesixfour{1}{乾}%
\definesixfour{2}{坤}%
\definesixfour{3}{屯}%
\definesixfour{4}{蒙}%
\definesixfour{5}{需}%
\definesixfour{6}{讼}%
\definesixfour{7}{师}%
\definesixfour{8}{比}%


\definesixfour{9}{小畜}%
\definesixfour{10}{履}%
\definesixfour{11}{泰}%
\definesixfour{12}{否}%
\definesixfour{13}{同人}%
\definesixfour{14}{大有}%
\definesixfour{15}{谦}%
\definesixfour{16}{豫}%


\definesixfour{17}{随}%
\definesixfour{18}{蛊}%
\definesixfour{19}{临}%
\definesixfour{20}{观}%
\definesixfour{21}{噬嗑}%
\definesixfour{22}{贲}%
\definesixfour{23}{剥}%
\definesixfour{24}{复}%


\definesixfour{25}{无妄}%
\definesixfour{26}{大畜}%
\definesixfour{27}{颐}%
\definesixfour{28}{大过}%
\definesixfour{29}{坎}%
\definesixfour{30}{离}%
\definesixfour{31}{咸}%
\definesixfour{32}{恒}%


\definesixfour{33}{遁}%
\definesixfour{34}{大壮}%
\definesixfour{35}{晋}%
\definesixfour{36}{明夷}%
\definesixfour{37}{家人}%
\definesixfour{38}{睽}%
\definesixfour{39}{蹇}%
\definesixfour{40}{解}%


\definesixfour{41}{损}%
\definesixfour{42}{益}%
\definesixfour{43}{夬}%
\definesixfour{44}{姤}%
\definesixfour{45}{萃}%
\definesixfour{46}{升}%
\definesixfour{47}{困}%
\definesixfour{48}{井}%


\definesixfour{49}{革}%
\definesixfour{50}{鼎}%
\definesixfour{51}{震}%
\definesixfour{52}{艮}%
\definesixfour{53}{渐}%
\definesixfour{54}{归妹}%
\definesixfour{55}{丰}%
\definesixfour{56}{旅}%


\definesixfour{57}{巽}%
\definesixfour{58}{兑}%
\definesixfour{59}{涣}%
\definesixfour{60}{节}%
\definesixfour{61}{中孚}%
\definesixfour{62}{小过}%
\definesixfour{63}{既济}%
\definesixfour{64}{未济}%
